package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import domain.Bet;
import domain.Table;

public class BetServlet extends HttpServlet {	
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse resp)
			throws ServletException, IOException {
		Table table = (Table)request.getSession().getAttribute("table");
		Bet bet = table.getActualBets().get( Integer.parseInt(request.getParameter("posicion")));
		request.setAttribute("bet", bet);
				
		request.getRequestDispatcher("bet.jsp").forward(request, resp);
	}
	
	protected Bet getBet(HttpServletRequest request){
		
		
		return null;
	}
}
